Skip to content

Add reasoning node type (LLM) and remove deprecated common actions#406

Merged
zhongkaifu merged 4 commits into
mainfrom
codex/add-reasoning-node-and-related-functions
Jan 25, 2026
Merged

Add reasoning node type (LLM) and remove deprecated common actions#406
zhongkaifu merged 4 commits into
mainfrom
codex/add-reasoning-node-and-related-functions

Conversation

@zhongkaifu
Copy link
Copy Markdown
Owner

Motivation

  • Remove several deprecated/fallback common business actions from the action registry to avoid carrying unused tooling and special-casing in validation logic.
  • Introduce a first-class "reasoning" node type to represent LLM-driven reasoning tasks with explicit params and an output schema so planners, validators, and the executor can treat LLM reasoning consistently.
  • Keep param validation and binding logic in sync with the new reasoning node shape to enable safe references and downstream schema checks.

Description

  • Removed deprecated actions (common.ask_ai.v1, common.classify_text.v1, common.join_list.v1, common.list_files.v1, common.split_list.v1, common.summarize.v1) from the business action registry and removed the outdated example assets under examples/search_news_summarize.
  • Added a new reasoning node type and model (ReasoningNode) and extended Node.model_validate to accept/validate reasoning nodes and their optional out_params_schema.
  • Plumbed reasoning support across planning and runtime: added _reasoning_params_schema and integration into param completion (planner/params_tools.py), new planner tools add_reasoning_node and update_reasoning_node, and mirrored params.expected_output_format into out_params_schema on updates and param completion (planner/structure.py, planner/workflow_builder.py).
  • Executor changes to run reasoning nodes: the dynamic executor builds a composed LLM prompt, resolves a toolset, calls ask_ai, and records/serializes results into the node outputs; validation and binding checks now treat a reasoning node's expected_output_format (or mirrored out_params_schema) as its output schema (executor/dynamic_executor.py, verification/binding_checks.py, verification/node_rules.py).
  • Removed the special-case logic that previously injected expected_format results into common.ask_ai.v1 outputs during workflow validation, and added visualization color for the reasoning node type (velvetflow/visualization.py).

Testing

  • No automated tests were executed for these changes. The change set was prepared and validated via repository grep and local edits, and the PR was created without running CI or test suites.

Codex Task

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 543e8702f6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1436 to +1439
action_schemas=action_schemas,
)
out_params_schema = cleaned_params.get("expected_output_format")
ref_error = _validate_existing_references(
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Parse reasoning output schemas supplied as strings

Reasoning params explicitly allow expected_output_format to be a string (see _reasoning_params_schema), but here the value is copied directly into out_params_schema without parsing. _schema_from_out_params_schema only accepts mappings, so a JSON schema provided as a string (e.g., from LLM tool calls) yields no schema and downstream bindings like {{ result_of.reasoning.foo }} will fail validation with “field does not exist.” This is a regression compared to the earlier common.ask_ai handling that parsed JSON strings; consider parsing string JSON or only setting out_params_schema when it’s already a mapping.

Useful? React with 👍 / 👎.

@zhongkaifu zhongkaifu merged commit 2a06789 into main Jan 25, 2026
1 check failed
@zhongkaifu zhongkaifu deleted the codex/add-reasoning-node-and-related-functions branch January 25, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant